<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>排序和单独对齐</title>
    <style>
        .outer {
            width: 600px;
            height: 600px;
            background-color: #888;
            margin: 0 auto;
            display: flex;
            justify-content: flex-start;



        }
        .inner {
            width: 200px;
            height: 200px;
            border: 1px solid black;
            background-color: skyblue;
            box-sizing: border-box;
            flex: 1 1 0;
        }
      
        .inner2{
            /* 默认所有order都是0,order小的排在前面，都一样就按顺序 */
            /* 改成-1，2就排前面了 */
            order: -1;

            /* 让inner2单独对齐,只能调侧轴，不要调主轴 */
            /* align-self: flex-end; */
            align-self: center;
        }
     
    

    </style>
</head>
<body>

<div class="outer">
    <div class="inner inner1">1</div>
    <div class="inner inner2">2</div>
    <div class="inner inner3">3</div>
</div>
<hr>

</body>
</html>